package com.demo.salary.transactionimplementation;

import com.demo.salary.abstracttransactions.ChangeClassificationTransaction;
import com.demo.salary.payrollimplementation.BiweeklySchedule;
import com.demo.salary.payrolldomain.PaymentClassification;
import com.demo.salary.payrolldomain.PaymentSchedule;
import com.demo.salary.payrollimplementation.CommissionedClassification;

public class ChangeCommissionedTransaction extends ChangeClassificationTransaction {

    double salary;
    double commissionRate;

    public ChangeCommissionedTransaction(int empId,double commissionRate, double salary) {
        super(empId);
        this.salary = salary;
        this.commissionRate = commissionRate;
    }

    @Override
    public PaymentSchedule getSchedule() {
        return new BiweeklySchedule();
    }

    @Override
    public PaymentClassification getClassification() {
        return new CommissionedClassification(commissionRate,salary);
    }
}
